package com.rules.admin.vo;

import com.google.common.collect.Sets;

import java.io.Serializable;
import java.util.Set;

public class PackageRoleVO implements Serializable {
   private Long id;
   private Set<Integer> roles = Sets.newConcurrentHashSet();

   public Set<Integer> getRoles() {
      return this.roles;
   }

   public void setRoles(Set<Integer> roles) {
      this.roles = roles;
   }

   public Long getId() {
      return this.id;
   }

   public void setId(Long id) {
      this.id = id;
   }

   public boolean equals(Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof PackageRoleVO)) {
         return false;
      } else {
         PackageRoleVO other = (PackageRoleVO)o;
         if (!other.canEqual(this)) {
            return false;
         } else {
            Object this$id = this.getId();
            Object other$id = other.getId();
            if (this$id == null) {
               if (other$id != null) {
                  return false;
               }
            } else if (!this$id.equals(other$id)) {
               return false;
            }

            Object this$roles = this.getRoles();
            Object other$roles = other.getRoles();
            if (this$roles == null) {
               if (other$roles != null) {
                  return false;
               }
            } else if (!this$roles.equals(other$roles)) {
               return false;
            }

            return true;
         }
      }
   }

   protected boolean canEqual(Object other) {
      return other instanceof PackageRoleVO;
   }

   public int hashCode() {

      int result = 1;
      Object $id = this.getId();
      result = result * 59 + ($id == null ? 43 : $id.hashCode());
      Object $roles = this.getRoles();
      result = result * 59 + ($roles == null ? 43 : $roles.hashCode());
      return result;
   }

   public String toString() {
      return "PackageRoleVO(id=" + this.getId() + ", roles=" + this.getRoles() + ")";
   }
}
